package com.news;

import java.text.SimpleDateFormat;

public class UserData {

    // private variables
    int _id;
    String _name, _pass, _lastLoginDate, _date;

    // Empty constructor
    public UserData() {

    }

    // constructor
    public UserData(int id, String name, String pass) {
        this._id = id;
        this._name = name;
        this._pass = pass;
    }

    // constructor
    public UserData(String name, String pass) {
        this._name = name;
        this._pass = pass;
    }

    // getting ID
    public int getID() {
        return this._id;
    }

    // setting id
    public void setID(int id) {
        this._id = id;
    }

    // getting name
    public String getName() {
        return this._name;
    }

    // setting name
    public void setName(String name) {
        this._name = name;
    }

    // getting phone number
    public String getPass() {
        return this._pass;
    }

    // setting phone number
    public void setPass(String pass) {
        this._pass = pass;
    }

    public String getDate() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        java.util.Date date = new java.util.Date();
        String str = dateFormat.format(date);
        return str;
    }
}